#include "gtest/gtest.h"

#include "threadsafestack.h"

using namespace algo;

//
TEST(PushTest, HandlesPush)
{
	ThreadSafeStack<int> stack;
	stack.push(123);
    EXPECT_EQ(stack.isEmpty(), false);
}

//
TEST(PushTest2, HandlesPush)
{
	ThreadSafeStack<int> stack;
	stack.push(123);
	std::shared_ptr<int> p(stack.pop());
    EXPECT_EQ(*p, 123);
}

int main(int argc, char **argv)
{
	::testing::InitGoogleTest(&argc, argv);
	return RUN_ALL_TESTS();
}